package org.eclipse.wtp.sample.calculator;
import java.lang.Math;


public class Calculator {
	Calculator()
	{
	}
	
	public double Sum(double a, double b)
	{
		return a+b;
	}
	
	public double Mult(double a, double b)
	{
		return a*b;
	}
	
	public double Minus(double a, double b)
	{
		return a-b;
	}
	
	public double Sin(double a)
	{
		return Math.sin(a);
	}
	
	public double Cos(double a)
	{
		return Math.cos(a);
	}
	
	public double Sqrt(double a)
	{
		return Math.sqrt(a);
	}
	
	public double[] Quad(double a, double b, double c)
	{
		double[] array = new double[2];
		array[0] = (-b+Math.sqrt(b*b-4*a*c))/(2*a);
		array[1] = (-b-Math.sqrt(b*b-4*a*c))/(2*a);
		return array;
	}
}